package com.jeesite.modules.yl.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 工人信息表Entity
 * @author ccz
 * @version 2025-03-24
 */
@Table(name="yl_worker", alias="a", label="工人信息表信息", columns={
		@Column(name="id", attrName="id", label="工人ID", isPK=true),
		@Column(name="username", attrName="username", label="工人姓名"),
		@Column(name="age", attrName="age", label="工人年龄"),
		@Column(name="yl_status", attrName="ylStatus", label="工人状态，1表示在职，0表示离职"),
		@Column(name="create_time", attrName="createTime", label="录用日期", isUpdateForce=true),
	}, orderBy="a.id DESC"
)
public class YlWorker extends DataEntity<YlWorker> {
	
	private static final long serialVersionUID = 1L;
	private String username;		// 工人姓名
	private String age;		// 工人年龄
	private String ylStatus;		// 工人状态，1表示在职，0表示离职
	private Date createTime;		// 录用日期

	public YlWorker() {
		this(null);
	}
	
	public YlWorker(String id){
		super(id);
	}
	
	@Size(min=0, max=50, message="工人姓名长度不能超过 50 个字符")
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}
	
	@Size(min=0, max=3, message="工人年龄长度不能超过 3 个字符")
	public String getAge() {
		return age;
	}

	public void setAge(String age) {
		this.age = age;
	}
	
	@Size(min=0, max=1, message="工人状态，1表示在职，0表示离职长度不能超过 1 个字符")
	public String getYlStatus() {
		return ylStatus;
	}

	public void setYlStatus(String ylStatus) {
		this.ylStatus = ylStatus;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}